/*
 * IBM Corporation.
 * Copyright (c) 2014 All Rights Reserved.
 */

package com.ibm.iisp.data.model;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 类作用：
 * @author Johnny@cn.ibm.com
 * 使用说明：
 */
@Entity
@Table(name = "IISP_DATA_TAB_COL")
public class DataTableColumn {
	@Id
	private String id;
	private String code;
	private String name;
	private String dataType;
	private String pattern;
	private String sortDirect;
	/**
	 * 列样式：如width:30%;
	 */
	private String style;
	private Boolean isFilter;
	/**
	 * 可选值
	 */
	@OneToMany
	@JoinColumn(name = "TABLE_COL_ID", nullable = false)
	private List<DataTableColumnOption> options;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public Boolean getIsFilter() {
		return isFilter;
	}

	public void setIsFilter(Boolean isFilter) {
		this.isFilter = isFilter;
	}

	public List<DataTableColumnOption> getOptions() {
		return options;
	}

	public void setOptions(List<DataTableColumnOption> options) {
		this.options = options;
	}

	public String getStyle() {
		return style;
	}

	public void setStyle(String width) {
		this.style = width;
	}

	public String getSortDirect() {
		return sortDirect;
	}

	public void setSortDirect(String sortDirection) {
		this.sortDirect = sortDirection;
	}

	public String getPattern() {
		return pattern;
	}

	public void setPattern(String pattern) {
		this.pattern = pattern;
	}

}
